package com.ailink.studentscard.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/card")
public class CardController {

    @ResponseBody
    @GetMapping("/location/{imei}")
    public String location(@PathVariable("imei") String imei){
        return "{\"msg\":\"成功\",\"code\":0,\"data\":[{\"location\":\"114.422221 30.612765\"},{\"location\":\"114.421435 30.615061\"},{\"location\":\"114.413023 30.61376\"}]}";
    }

    @ResponseBody
    @RequestMapping("/{imei}")
    public String sportsinf(@PathVariable("imei") String imei){
        System.out.println(imei);
        return "{\"msg\":\"成功\",\"code\":0,\"data\":{\"imei\":\"131321323231313\",\"location\":\"114.421435 30.615061\",\"stepNumber\":11,\"speed\":10.0,\"cid\":1,\"timestamp\":\"1546500601\"}}";
    }

}
